home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1986 May / Ahoy_Magazine_86-05_1986_Double_L.d64 / english darts (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  5KB  |  154 lines

  1. 1 rem: ***english darts***
  2. 2 :
  3. 5 rem: ***initialization***
  4. 7 :
  5. 10 c$=chr$(147):d$=chr$(17):h$=chr$(19):f$=chr$(144):rf$=chr$(146):ro$=chr$(18)
  6. 20 c1$=chr$(28):c2$=chr$(30):c3$=chr$(31):c4$=chr$(156):c5$=chr$(158):bc=53280
  7. 30 c6$=chr$(159):v=53248:cl=646:s=102:na$="*english darts*":a$="":sn$="":b$=""
  8. 40 rd=1:poke53281,1:pokebc,9:fork=0to62:reada:poke832+k,a:next
  9. 50 fork=0to62:reada:poke896+k,a:next:fork=49152to49245:reada:pokek,a:next
  10. 60 poke49152+19,0:poke2041,13:poke2042,14:poke2043,14:poke2044,14:sys49152
  11. 62 :
  12. 65 rem: ***billboard***
  13. 67 :
  14. 70 gosub750:gosub620:print:print:printf$tab(12)na$:gosub740
  15. 80 printc2$ro$tab(13)" which game? ":print:printtab(8)"301 "ro$" <1> ";
  16. 90 printrf$" or 501 "ro$" <2> ":print
  17. 100 getk$:k=val(k$):ifk<1ork>2then100
  18. 110 ifk=1thenga=301:goto130
  19. 120 ga=501
  20. 130 printro$tab(7)" number of players? "rf$" (1-7)"
  21. 140 getk$:z=val(k$):ifz<1orz>7then140
  22. 150 gosub650
  23. 152 :
  24. 155 rem: ***screen print***
  25. 157 :
  26. 160 pokebc,1:printh$ro$"            "na$"        ":rem*  -11- and -8- spaces
  27. 170 printc5$ro$" player number "rf$pp;
  28. 180 printc3$ro$tab(20)" dart number   "rf$th
  29. 190 printc4$ro$" round score   "rf$rs;
  30. 200 printc1$ro$tab(20)" round number  "rf$rd
  31. 210 printc2$ro$" current score "rf$tp(pp);
  32. 220 printc6$ro$tab(20)" # of players  "rf$z:gosub740:fork=1toz:cc=k+1:pokecl,cc
  33. 230 printro$tab(21)" player # "rf$k;:printtp(k):next:gosub740
  34. 240 printc4$tab(1)a$:print:printf$tab(7)sn$:print:printc4$tab(4)b$:print
  35. 245 ifth>3thengosub720:fork=1to9:pokev+k,0:next:gosub650:goto160
  36. 250 poke198,0:gosub720:printc5$"press "ro$f$"<key>"rf$c5$" to toss"
  37. 252 :
  38. 255 rem: ***throw sequence***
  39. 257 :
  40. 260 fork=1664to1683:pokek,32:next:fork=1744to1763:pokek,32:next
  41. 270 fork=1824to1843:pokek,32:next:ifth=1thenq=4:w=5:y=215:g=6:goto300
  42. 280 ifth=2thenq=6:w=7:y=211:g=14:goto300
  43. 290 ifth=3thenq=8:w=9:y=219:g=30
  44. 300 pokev+21,g:pokev+23,2:pokev+29,28:fork=1toz:ifk=ppthencc=k+1:goto320
  45. 310 next
  46. 320 pokev+40,11:fork=41to43:pokev+k,cc:next:pokev+2,255:pokev+3,90
  47. 330 forl=90to110:pokev+q,30:pokev+w,l:ifpeek(198)=1then370
  48. 340 fort=1to10:nextt:nextl
  49. 350 forl=110to90step-1:pokev+q,30:pokev+w,l:ifpeek(198)=1then370
  50. 360 fort=1to10:nextt:nextl:goto330
  51. 370 fork=1904to1923:pokek,32:next:pokev+q,0:pokev+w,0:poke198,0:pokev+21,g
  52. 380 fork=30toy:pokev+q,k:pokev+w,l:next:gosub730:r=n:gosub730:d=n
  53. 390 a=0:fork=80to99:a=a+1:ifl=kthen430
  54. 400 next
  55. 410 a=21:fork=101to110:a=a-2:ifl=kthen430
  56. 420 next:ifl=100thena=50
  57. 430 ifa=50thenb=a:a$="you threw a...":sn$="bullseye!":goto480
  58. 440 ifa=randa=dthenb=a*3:a$="you threw a triple":goto470
  59. 450 ifa=rthenb=a*2:a$="you threw a double":goto470
  60. 460 b=a:a$="you threw a single"
  61. 470 sn$=str$(a)
  62. 480 b$="for"+str$(b)+" points":tp(pp)=tp(pp)+b:rs=rs+b
  63. 485 iftp(pp)=gathenfork=1to9:pokev+k,0:next:goto560
  64. 490 iftp(pp)>gathenfork=1to9:pokev+k,0:next:goto520
  65. 500 th=th+1:goto160
  66. 512 :
  67. 515 rem: ***broke statement***
  68. 517 :
  69. 520 pokebc,2:gosub750:gosub620:gosub740
  70. 530 printc4$tab(14)"you threw"b:print:printtab(18)"and":print
  71. 540 printf$tab(14)"b*r*o*k*e!!":printc4$:gosub720:tp(pp)=tp(pp)-b
  72. 550 rs=0:th=1:gosub650:fork=1to9:pokev+k,0:next:goto160
  73. 552 :
  74. 555 rem: ***winner statement***
  75. 557 :
  76. 560 pokebc,5:gosub750:gosub620:gosub740:printc4$tab(5)na$" winner is..."
  77. 570 print:gosub720:printf$tab(10)"player number"pp:print
  78. 572 print:printc4$tab(8)"see final scores? (y/n)"
  79. 574 getk$:ifk$=""then574
  80. 576 ifk$="y"thenpp=z:nu=1:goto650
  81. 577 ifk$="n"then580
  82. 578 ifk$<>"y"ork$<>"n"then574
  83. 579 gosub740
  84. 580 print:printc5$ro$tab(10)" play again? "rf$" (y/n)"
  85. 590 getk$:ifk$=""then590
  86. 595 ifk$="y"thenclr:goto10
  87. 600 printc$:gosub740:printc2$tab(12)na$:print:printtab(17)"e*n*d":gosub720
  88. 610 pokev+21,0:printc$:end
  89. 612 :
  90. 615 rem: ***sprite logo***
  91. 617 :
  92. 620 pokev+21,30:pokev+23,2:pokev+29,28:pokev+40,12:pokev+41,11:pokev+42,12
  93. 630 pokev+43,15:pokev+2,180:pokev+3,100:pokev+4,144:pokev+5,104:pokev+6,147
  94. 640 pokev+7,111:pokev+8,142:pokev+9,118:return
  95. 642 :
  96. 645 rem: ***next player/box score subroutine***
  97. 647 :
  98. 650 pokebc,5:gosub750:gosub620:th=1:rs=0:pp=pp+1:ifpp>zthen680
  99. 660 gosub740:printc2$tab(8)"player number"f$pp;:printc2$"up next":gosub720
  100. 670 fork=1to9:pokev+k,0:next:a$="":sn$="":b$="":printc$:return
  101. 680 print:print:printc2$ro$tab(4)" player number "tab(25)" points ":print:print
  102. 690 fork=1toz:cc=k+1:pokecl,cc:printtab(10)k;:printtab(26)tp(k):print:next
  103. 700 printh$:fork=1to22:printd$;:next:printc4$ro$tab(12)" press any key "
  104. 710 poke198,0:wait198,1:poke198,0:rd=rd+1:pp=0:ifnu=1thengosub750:goto579
  105. 711 goto650
  106. 712 :
  107. 715 rem: ***time delay subroutine***
  108. 717 :
  109. 720 fort=1to1500:next:return
  110. 722 :
  111. 725 rem: ***random subroutine***
  112. 727 :
  113. 730 n=int(20*rnd(0))+1:return
  114. 732 :
  115. 735 rem: ***center subroutine***
  116. 737 :
  117. 740 printh$:fork=1to15:printd$;:next:return
  118. 742 :
  119. 745 rem: ***border subroutine***
  120. 747 :
  121. 750 printc$:pokecl,7:fork=1024to1063:pokek,s:next:fork=1024to1984step40:pokek,s
  122. 760 next:fork=1063to2023step40:pokek,s:next:fork=1984to2023:pokek,s:next:return
  123. 762 :
  124. 765 rem: ***data***
  125. 767 :
  126. 770 data0,16,0,0,56,0,0,85
  127. 771 data0,0,146,0,1,17,0,2
  128. 772 data56,128,5,85,64,8,146,32
  129. 773 data17,85,16,34,56,136,127,255
  130. 774 data252,34,56,136,17,85,16,8
  131. 775 data146,32,5,85,64,2,56,128
  132. 776 data1,17,0,0,146,0,0,84
  133. 777 data0,0,56,0,0,16,0,0
  134. 778 data0,0,0,0,0,0,0,0
  135. 779 data0,0,0,0,0,0,0,0
  136. 780 data0,0,0,0,240,0,0,127
  137. 781 data0,0,63,254,0,31,255,255
  138. 782 data63,254,0,127,0,0,254,0
  139. 783 data0,0,0,0,0,0,0,0
  140. 784 data0,0,0,0,0,0,0,0
  141. 785 data0,0,0,0,0,0,173,21
  142. 786 data192,141,22,192,120,169,24,141
  143. 787 data20,3,169,192,141,21,3,88
  144. 788 data96,5,0,20,0,0,206,22
  145. 789 data192,208,61,173,21,192,141,22
  146. 790 data192,173,33,208,41,15,141,20
  147. 791 data192,160,0,132,251,169,216,133
  148. 792 data252,238,23,192,173,23,192,41
  149. 793 data1,170,177,251,41,15,205,19
  150. 794 data192,240,5,205,20,192,208,5
  151. 795 data189,19,192,145,251,200,208,234
  152. 796 data230,252,165,252,201,220,208,226
  153. 797 data76,49,234,52
  154.